﻿using Quartz;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System.Threading.Tasks;
using Yuebon.Commons.Helpers;
using Yuebon.Commons.Log;

namespace Yuebon.Quartz.Jobs
{
    public  class AutoErpToMesJob:IJob
    {

        

        public Task Execute(IJobExecutionContext context)
        {
            var type = MethodBase.GetCurrentMethod().DeclaringType;
            try
            {
                Log4NetHelper.WriteInfo(type, "定时执行开始：" + DateTime.Now);
                //PDMItemToK3ERP pDMItemToK3ERP = new PDMItemToK3ERP();
                ////PDM 物料 to ERP
                //pDMItemToK3ERP.DataItem();
                ////PDM Bom to ERP
                //pDMItemToK3ERP.DataICbom();
                ////K3 物料 toMes
                //ItemDataToMes itemDataToMes = new ItemDataToMes();
                //itemDataToMes.DataSend();
                ////K3 生产任务单 to Mes
                //IcmoToMes icmoToMes = new IcmoToMes();
                //icmoToMes.DataSendIcmo();
                ////K3 料单 to Mes
                //icmoToMes.DataSendICStockBill();
                ////K3 补料单 to Mes
                //ICItemScrapToMes iCItemScrapToMes = new ICItemScrapToMes();
                //iCItemScrapToMes.DataSend();
                Log4NetHelper.WriteInfo(type, "定时执行结束：" + DateTime.Now);
            }catch(Exception ex)
            {
                Log4NetHelper.WriteInfo(type, ex.Message);
            }
            return Task.CompletedTask;
        }
    }
}
